package com.education.realtime.util;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ThreadPoolUtil {
    public static ThreadPoolExecutor getThreadPool() {
        return new ThreadPoolExecutor(
            100,
            200,  // 非核心线程的空闲时间
            120,
            TimeUnit.SECONDS,
            new LinkedBlockingQueue<Runnable>(100)
        );
    }
}